{extend name="common@base" /}
{block name="content"}
<section class="content">
  <form role="form" class="form" method="post">
    <div class="box">
      <div class="box-body">
        <div class="row">
          <div class="col-xs-12 col-sm-6">
            <div class="form-group">
              <label>上级部门</label>
              {:form_dropdown('form[parent_id]',$departments,$row.parent_id,'class="form-control"')}
            </div>
            <div class="form-group">
              <label>部门名称</label>
              <input name="form[title]" type="text" class="form-control" value="{$row.title}">
            </div>
            <div class="form-group">
              <label>部门描述</label>
              <input name="form[desc]" type="text" class="form-control" value="{$row.desc}">
            </div>
            <div class="form-group">
              <label>部门缩写</label>
              <input name="form[short]" type="text" class="form-control" value="{$row.short}">
            </div>
            <div class="form-group">
              <label>部门排序<input name="form[sort]" type="number" class="form-control" value="{$row.sort}"> </label>
            </div>
            <div class="checkbox">
              <label>
                {:form_checkbox('form[is_hide]',1,$row[is_hide])}是否隐藏
              </label>
            </div>
            <div class="checkbox">
              <label>
                {:form_checkbox('form[is_branch]',1,$row[is_branch])}是否分公司
              </label>
            </div>
          </div>
        </div>

      </div>
      <div class="box-footer">
        <button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
        <a href="javascript:history.back()" class="btn btn-default">返回</a>
      </div>
    </div>
  </form>
</section>
{/block}
{block name="page_script"}
<script>
  require(['layer_config', "ajaxForm"], function (layer) {
  });
</script>

{/block}

